import Vue from 'vue'
import Router from 'vue-router'
import Main from '@/components/Main'
import Home from '@/view/Home/index'
import Article from '@/view/article/index'
import Archive from '@/view/archive/index'
import Nav from '@/view/nav/index'
import Message from '@/view/message/index'
import Categorize from '@/view/categorize/index'
import About from '@/view/about/index'

Vue.use(Router)

export default new Router({
  mode: "history",
  routes: [
    {
      path: '/',
      name: 'Main',
      component: Main,
      redirect:'/pages/home',
      children:  [
        {
          name: 'Home',
          path: '/pages/Home',
          component: Home
        },
        {
          name: 'Article',
          path: '/pages/Article',
          component: Article
        },
        {
          name: 'Archive',
          path: '/pages/Archive',
          component: Archive
        },
        {
          name: 'Nav',
          path: '/pages/Nav',
          component: Nav
        },
        {
          name: 'Message',
          path: '/pages/Message',
          component: Message
        },
        {
          name: 'Categorize',
          path: '/pages/Categorize',
          component: Categorize
        },
        {
          name: 'About',
          path: '/pages/About',
          component: About
        }
      ]
    }
  ]
})
